# start
# 用于初始化用户的数据
# 把已经存活时间都设置为 0
execute at @s[tag=!start] as @s run scoreboard players add @s survival_seconds 0
execute at @s[tag=!start] as @s run scoreboard players add @s survival_minutes 0
execute at @s[tag=!start] as @s run scoreboard players add @s survival_hours 0
execute at @s[tag=!start] as @s run scoreboard players add @s survival_all 0
# 设置初始的时长
execute at @s[tag=!start] as @s run scoreboard players set @s time_seconds 1201
execute at @s[tag=!start] as @s run scoreboard players set @s level 1
# 统计的初始化
execute at @s[tag=!start] as @s run scoreboard players add @s coal 0
execute at @s[tag=!start] as @s run scoreboard players add @s iron 0
execute at @s[tag=!start] as @s run scoreboard players add @s gold 0
execute at @s[tag=!start] as @s run scoreboard players add @s diamond 0
execute at @s[tag=!start] as @s run scoreboard players add @s copper 0
execute at @s[tag=!start] as @s run scoreboard players add @s netherite 0
execute at @s[tag=!start] as @s run scoreboard players add @s raw_copper 0
execute at @s[tag=!start] as @s run scoreboard players add @s raw_gold 0
execute at @s[tag=!start] as @s run scoreboard players add @s raw_iron 0
execute at @s[tag=!start] as @s run scoreboard players add @s emerald 0
execute at @s[tag=!start] as @s run scoreboard players add @s gold_nugget 0
execute at @s[tag=!start] as @s run scoreboard players add @s iron_nugget 0
execute at @s[tag=!start] as @s run scoreboard players add @s timeaddcount 0
# 结束提示
execute at @s[tag=!start] as @s run scoreboard players add @s endtitle 0
# gamemode
execute at @s[tag=!start] as @s run gamemode survival @s[m=!survival]
# 提示
execute at @a[tag=!start] as @s run tellraw @s {"rawtext":[{"text":"§l§e时间陷阱§f>>§r§f时间陷阱。"}]}
execute at @a[tag=!start] as @s run tellraw @s {"rawtext":[{"text":"§l§e时间陷阱§f>>§r§f您需要挖掘矿物以换取生存的时间。手持矿物并抬头即可换取生存时间。"}]}
execute at @a[tag=!start] as @s run tellraw @s {"rawtext":[{"text":"§l§e时间陷阱§f>>§r§f欲买桂花同载酒，终不似，少年游。 摘录自 刘过《唐多令·芦叶满汀洲》。"}]}
execute at @a[tag=!start] as @s run tellraw @s {"rawtext":[{"text":"§l§e时间陷阱§f>>§r§f祝您游玩愉快。"}]}
# 完成
execute at @s[tag=!start] as @s run tag @s add start